/******************************************************************************** /
 * Main.java - JPLearning Project												*
 * 		a																		*
 * 		This program is free software; you can redistribute it and/or modify	*
 *		it under the terms of the GNU General Public License as published by	*
 *		the Free Software Foundation; version 2 of the License.					*
 *																				*
 *		This program is distributed in the hope that it will be useful,			*
 *		but WITHOUT ANY WARRANTY; without even the implied warranty of			*
 *		MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the			*
 *		GNU General Public License for more details.							*
 *																				*
 ********************************************************************************/
package org.jplearning;

import org.jplearning.controller.MainController;
import org.jplearning.model.DictionaryModel;
import org.jplearning.view.FrameFactory;
import org.jplearning.view.IMainFrame;

public class Main {
	public static void main(String[] args) {
		System.setProperty("apple.laf.useScreenMenuBar", "true");

		// Creates the model
		DictionaryModel modelo = new DictionaryModel();
		
		// Gives the model reference to the controller object
		MainController.getInstance().setModel(modelo);
		
		// Creates de view
		IMainFrame mainFrame = FrameFactory.getInstance().getIMainFrame();
		
		// Displays the view
		mainFrame.setVisible(true);
		
		// Puts the view into the model's listener
		modelo.addModelListener(mainFrame.getDictionaryView());
	}
}
